package com.yinxin.email.utils;

import javax.mail.Authenticator;
import javax.mail.PasswordAuthentication;

/**
 * @author yinxin
 * @version 1.0
 * @Description:
 * @date 2022/11/914:25
 */
public class MyAuthenticator extends Authenticator {
    String userName=null;
    String passWord=null;
    public MyAuthenticator() {
    }

    public MyAuthenticator(String username, String password) {
        this.userName = username;
        this.passWord = password;
    }
    protected PasswordAuthentication getPasswordAuthentication() {
        return new PasswordAuthentication(userName, passWord);
    }
}
